package com.huwaiwai.akka.demo03;

import akka.actor.UntypedAbstractActor;
import akka.event.Logging;
import akka.event.LoggingAdapter;
import scala.util.Random;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by huweiwei on 2017/5/16.
 */
public class Bird extends UntypedAbstractActor {

    private final LoggingAdapter log = Logging.getLogger(getContext().system(), this);
    private PsoValue pBest = null;
    private PsoValue gBest = null;
    private List<Double> velocity = new ArrayList<>(5);
    private List<Double> x = new ArrayList<>(5);
    private Random r = new Random();

    @Override
    public void onReceive(Object o) throws Throwable {
        for (int i = 1; i < 5; i++) {
            velocity.add(Double.NEGATIVE_INFINITY);
            x.add(Double.NEGATIVE_INFINITY);
        }

    }
}
